@extends('back.index')
@section('title','作者信息管理-后台管理系统')
@section('mian')
    <div style="font-size:14px;padding:20px;" class="modal-content">
        <h2 class="sub-header power_mian">作者信息管理</h2>
        <div class="table-responsive">
            <table class="table table-striped">
                <tr>
                    <th>笔名</th>
                    <th>头像</th>
                    <th>性别</th>
                    <th>手机号</th>
                    <th>邮箱</th>
                    <th>QQ</th>
                    <th>详细地址</th>
                    <th>操作</th>
                </tr>
                @if(count($userList))
                @foreach($userList as $list)
                    <tr>
                        <td>{{$list->nickname}}</td>
                        <td>
                            @if($list->icon)
                                <img src="{{asset('image/writer/'.$list->icon)}}" alt="" style="height:100px;width:100px">
                            @else
                                <img src="{{asset('image/public.jpg')}}" alt="" style="height:100px;width:100px">
                            @endif
                        </td>
                        <td>
                            @if($list->sex == 1)
                                男
                                @elseif($list->sex == 2)
                                女
                                @elseif($list->sex == 3)
                                保密
                            @endif
                        </td>
                        <td>{{$list->tel}}</td>
                        <td>{{$list->email}}</td>
                        <td>{{$list->qq}}</td>
                        <td>{{$list->newaddress}}</td>
                        <td><a href="{{url('back/writer/myBook/'.$list->id)}}" class="btn btn-info">查看作品</a>&nbsp;<a href="{{url('back/writer/weblog/'.$list->id)}}" class="btn btn-info">查看动态</a>&nbsp;<a href="{{url('back/writer/userDetails/'.$list->id)}}" class="btn btn-info">详细资料</a>&nbsp;<a href="{{url('back/writer/userUpdate'.'/'.$list->id)}}" class="btn btn-info">修改</a>&nbsp;<a href="{{url('back/writer/userdel'.'/'.$list->id)}}" class="btn btn-info">删除</a></td>
                    </tr>
                    @endforeach
                    @else
                    <tr>
                        <td colspan="8" style="text-align: center;border-bottom: 1px solid #DDD"><h2>暂无数据</h2></td>
                    </tr>
                    @endif
            </table>
            {{$userList->links()}}
        </div>
    </div>
    @endsection